<div ng-controller="homeCtrl">
    <div class="bg-light lter b-b wrapper-md">
        <h4 class="m-n font-thin">首页</h4>
    </div>
    <div class="panel-body">
            <div class="col-xs-9">
                <div>
                    <div class="row">
                        <div class="panel-body panel">
                            <div class="row row-sm text-center">
                                <div class="col-md-3">
                                    <div class="block padder-v item b-a bg-primary">
                                        <div class="font-bold h1">￥{{header.totalMoney | number:2}}</div>
                                        <span class="h5">全部交易额</span>
                                    </div>
                                </div>
                                <div class="col-md-3">
                                    <div class="block bg-danger padder-v item">
                                        <div class="font-bold h1">{{header.totalCount}}</div>
                                        <span class="text-muted h5">总付款订单数</span>
                                    </div>
                                </div>
                                <div class="col-md-3">
                                    <div class="block bg-success padder-v item">
                                        <div class="font-bold h1">￥{{header.todayMoney | number:2}}</div>
                                        <span class="h5">昨日交易额</span>
                                    </div>
                                </div>
                                <div class="col-md-3">
                                    <div class="block bg-info padder-v item">
                                        <div class="font-bold h1">{{header.todayCount}}</div>
                                        <span class="text-muted h5">昨日付款单数</span>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="panel-body row">
                        <div class="panel-body m-b">
                            <div class="bottom text-left pull-left">
                                <h4 class="font-bold">销售统计</h4>
                            </div>
                            <div class="pull-right m-t-xs">
                                <div class="inline">
                                    <p class="inline">年份:</p>
                                    <div class="inline">
                                        <select class="input-sm form-control" ng-model="ordersYears" ng-options="item for item in years" ng-change="changeYear()">
                                        </select>
                                    </div>
                                </div>
                                <div class="inline">
                                    <p class="inline">月份:</p>
                                    <div class="inline">
                                        <select class="input-sm form-control" ng-model="ordersMonth" ng-options="item for item in months" ng-change="changeMonth()">
                                        </select>
                                    </div>
                                </div>
                            </div>
                        </div >


                        <div class="panel-body">
                            <line id="main" legend="legend" item="item" data="data" serie="serie"></line>
                        </div>
                    </div>
                    <div class="panel-body row">
                        <div class="panel-body no-padder">
                            <div class="bottom text-left pull-left">
                                <h4 class="font-bold"><i class="icon-fire"></i>&nbsp;本月前10商品销量排行</h4>
                            </div>
                        </div>
                        <div class="table-responsive">
                            <div class="m-b">
                                <table class="table table-striped">
                                    <thead>
                                        <tr>
                                            <th>名称</th>
                                            <th>销量</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                    <tr ng-repeat="item in goods">
                                        <td>{{item.name}}</td>
                                        <td>{{item.totalCount}}</td>
                                    </tr>
                                    </tbody>
                                </table>
                            </div>
                            <div class="text-center m-t-xs h6" ng-if="goods==null || goods.length<=0">
                                ~本月暂未销量纪录~
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        <div class="col-xs-3">
            <div class="bg-white panel">
                <div class="panel-body panel m-n b-b">
                    <span class="inline h6 m-r-xs">平台公告</span>
                    <a class="inline" ui-sref="app.notice"><span class="h6 text-success">查看更多</span></a>
                </div>
                <div class="panel panel-body m-n" ng-if="notices.length>0">
                    <div class="bg-dark-con m-n">
                        <div class="bg-dark-con-top-circle"></div>
                    </div>
                    <div class="bg-dark-con" ng-repeat="item in notices">
                        <div class="bg-dark-con-top-circle-o"></div>
                        <div>
                            <div class="h5 block font-bold m-b-xs">
                                <span class="block">{{item.name}}</span>
                            </div>
                            <div class="m-b-xs">
                                <p class="h6 inline m-r-xs">{{item.content|textLengthSet:true:50:'...'}}</p>
                                <a class="inline" ui-sref="app.noticeDetail({id:item.id})"><span class="h6 text-success">详情</span></a>
                            </div>
                            <p class="h6 block text-muted" ng-if='item.type==0'>系统公告 - {{item.createdTime}}</p>
                            <p class="h6 block text-muted" ng-if='item.type==2'>城市运营公告 - {{item.createdTime}}</p>
                        </div>
                    </div>
                    <div class="bg-dark-con">
                        <div class="bg-dark-con-top-circle-o"></div>
                        <div class="bg-dark-con-bottom-circle-o"></div>
                    </div>
                </div>
                <div class="text-center text-muted panel-body" ng-if="notices.length<=0">
                    <span class="h6">~ 暂无平台公告 ~</span>
                </div>
            </div>
        </div>
        <script type="text/ng-template" id="findAllUnread.html">
            <div ng-include="'tpl/home/findAllUnread.html'"></div>
        </script>
    </div>
</div>